package com.jemmyee.pizza.service;

import java.io.Serializable;
import java.util.List;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.hibernate.criterion.DetachedCriteria;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

import com.jemmyee.core.dao.Page;
import com.jemmyee.pizza.dao.ICostInstallDao;
import com.jemmyee.pizza.entity.CostInstall;

@Repository("costInstallService")
public class CostInstallServiceImpl implements ICostInstallService<CostInstall>{

	private static final Log log = LogFactory.getLog(CostInstallServiceImpl.class) ;
	@Autowired
	private ICostInstallDao costInstallDao ;
	
	public void delete(CostInstall entity) {
		costInstallDao.delete(entity) ;		
	}

	public void deleteAll(List<CostInstall> list) {
		costInstallDao.deleteAll(list) ;
		
	}

	public void deleteById(Serializable id) {
		costInstallDao.deleteById(id) ;
	}

	public List<CostInstall> findAll() {
		return costInstallDao.findAll(new CostInstall());
	}

	public List<CostInstall> findByCriteria(DetachedCriteria criteria) {
		return costInstallDao.findByCriteria(criteria);
	}

	public CostInstall findById(Serializable id) {
		return costInstallDao.findById(id);
	}

	public List<CostInstall> findByProperty(String propertyName, Object value) {
		return costInstallDao.findByProperty(new CostInstall(), propertyName, value);
	}

	public Page findPageByCriteria(DetachedCriteria detachedCriteria,
			int pageSize, int startIndex,String order) {
		return costInstallDao.findPageByCriteria(detachedCriteria, pageSize, startIndex, order);
	}

	public void save(CostInstall entity) {
		costInstallDao.save(entity) ;
	}

	public void update(CostInstall entity) {
		costInstallDao.update(entity) ;
	}

}
